using UnityEngine;

public class Item : MonoBehaviour
{
    public int minscaleLevel = 1;
    public int maxscaleLevel = 5;
    [HideInInspector] public int scaleLevel = 0;
    public int money = 100;
    public int maxMoney = 0;
    public float deceleration = 1f;//减速

    private void Start()
    {
        scaleLevel = Random.Range(minscaleLevel, maxscaleLevel);
        if (maxMoney == 0)
        {
            money = money * (scaleLevel + 1) * 5;
        }
        else
        {
            money = Random.Range(money, maxMoney) * (scaleLevel + 1) * 5;
        }

        transform.localScale += transform.localScale * scaleLevel;
        // 随机生成一个旋转角度
        // Quaternion randomRotation = Quaternion.Euler(0, 0, Random.Range(0, 360));
        // transform.rotation = randomRotation;
    }
}